<ul class="breadcrumb">
    <li><a href="{{base}}/admin/table/list">home</a></li>
    <li><a href="{{base}}/admin/column/{{table}}/list">{{table}}</a></li>
</ul>

<h2>update column</h2>

<form class="form-horizontal" method="post">
    {{for:field:key:form}}
        <div class="form-group">
            <label class="control-label col-sm-2" for="{{key}}">{{key}}{{if:field.required}}*{{endif}}</label>
            <div class="col-sm-7">
                {{if:field.type|eq("select")}}
                    <select id="{{key}}" name="{{key}}" class="form-control"{{if:field.required}} required{{endif}}>
                        <option value=""></option>
                        {{for:v:k:field.values}}
                            <option value="{{k}}"{{if:k|eq(field.value)}} selected{{endif}}>{{v}}</option>
                        {{endfor}}
                    </select>
                {{else}}
                    <input class="form-control" id="{{key}}" name="{{key}}" type="{{field.type}}" value="{{field.value}}"{{if:field.required}} required{{endif}}>
                {{endif}}
            </div>
        </div>
    {{endfor}}
    <p>
        <button type="submit" class="btn btn-primary">Save</button>
        <a class="btn btn-danger" href="{{base}}/admin/column/{{table}}/delete/{{name}}">Delete</a>
    </p>
    
</form>
